package com.cc.openeye.dynamic.recommend.entity.dynamicResponse

import kotlinx.serialization.Serializable

@Serializable
data class DataX(
    val addWatermark: Boolean ?= null,
    val area: String? = null,
    val checkStatus: String? = null,
    val city: String? = null,
    val collected: Boolean,
    val consumption: Consumption,
    val cover: Cover,
    val createTime: Long? = null,
    val dataType: String,
    val description: String,
    val duration: Int? = null,
    val height: Int? = null,
    val id: Int,
    val ifMock: Boolean? = null,
    val latitude: Double? = null,
    val library: String,
    val longitude: Double? = null,
    val owner: Owner? = null,
    val playUrl: String? = null,
    val playUrlWatermark: String? = null,
    val privateMessageActionUrl: String? = null,
    val reallyCollected: Boolean,
    val recentOnceReply: RecentOnceReply? = null,
    val releaseTime: Long,
    val resourceType: String,
    val selectedTime: String? = null,
    val source: String? = null,
    val status: String? = null,
    val tags: List<Tag>? = null,
    val title: String,
    val transId: String? = null,
    val type: String? = null,
    val uid: Int? = null,
    val updateTime: Long? = null,
    val url: String? = null,
    val urls: List<String>? = null,
    val urlsWithWatermark: List<String>? = null,
    val validateResult: String? = null,
    val validateStatus: String? = null,
    val validateTaskId: String? = null,
    val width: Int? = null
) {

    fun getWhProportion() = (width ?: 0).toFloat() / (height ?: 1)

}